#ifndef SKINTHRESHOLDDIALOG_H
#define SKINTHRESHOLDDIALOG_H

#include "../mlgesture_global.h"

#include <QDialog>
#include <QTimer>
#include <cv.h>
#include <highgui.h>

#include "../handgestureexception.h"

using namespace cv;

namespace Ui {
    class skinThresholdDialog;
}

namespace mlgesture {

class MLGESTURESHARED_EXPORT SkinThresholdDialog : public QDialog
{
    Q_OBJECT

public:
	explicit SkinThresholdDialog(int cam_id = -1, int low_skin = -1, int upper_skin = -1, int low_value = -1,
								 int upper_value = -1, QWidget *parent = 0) throw (HandGestureException);
	~SkinThresholdDialog();
	int getLowThreshold() const;
	int getUpperThreshold() const;
	int getValueLowThreshold() const;
	int getValueUpperThreshold() const;

private:
	Ui::skinThresholdDialog *ui_;
	int camId_;
	Mat frame_;
	Mat frameMask_;
	VideoCapture cap_;
	vector<Mat> hsvChannels_;
	QTimer *timer_;

private slots:
	void process() throw (HandGestureException);
};

}

#endif // SKINTHRESHOLDDIALOG_H
